package com.zhilianbao.leyaogo.view.widgets;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;

import com.bql.variousbanner.widget.banner.BaseIndicatorBanner;
import com.zhilianbao.leyaogo.R;
import com.zhilianbao.leyaogo.ui.adapter.home.slider.HomeAppSlider;
import com.zhilianbao.leyaogo.utils.ImageUtils;
import com.zhilianbao.leyaogo.utils.Utils;

import butterknife.BindView;
import butterknife.ButterKnife;


/**
 * ClassName: HomePageBanner <br>
 * Description: 首页Top Banner<br>
 * Author: Cyarie <br>
 * Created: 2016/4/20 10:06 <br>
 * Update Time：<br>
 * Update Description：<br>
 */
public class HomeTopBanner extends BaseIndicatorBanner<HomeAppSlider.HomeAppSliderData.HomeAppSliderBean, HomeTopBanner> {

    @BindView(R.id.iv_home_banner)
    ImageView mIvHomeBanner;

    public HomeTopBanner(Context context) {
        super(context);
    }

    public HomeTopBanner(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public HomeTopBanner(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public View onCreateItemView(int position) {
        View contentView = View.inflate(context, R.layout.home_top_banner, null);
        ButterKnife.bind(this, contentView);
        ImageUtils.loadHomeTopBanner(Utils.returnUrlShow(list.get(position).getImg()), mIvHomeBanner);
        return contentView;
    }
}
